package org.jackysoft.struts2.workflow;
import java.util.Collection;

import javax.annotation.Resource;

import org.apache.struts2.convention.annotation.Namespace;
import org.jackysoft.entity.SystemService;
import org.jackysoft.entity.SystemServiceSetting;
import org.jackysoft.service.SystemServiceService;
import org.jackysoft.service.SystemServiceSettingService;
import org.jackysoft.struts2.workflow.AbstractWorkflowAction;
import org.springframework.beans.factory.config.BeanDefinition;
import org.springframework.context.annotation.Scope;



@Namespace("/systemservicesetting")
@Scope(BeanDefinition.SCOPE_PROTOTYPE)
public class SystemServiceSettingAction extends AbstractWorkflowAction<SystemServiceSetting> {
	/**
	 * 
	 */
	private static final long serialVersionUID = 2011436335648753255L;
	/**
	 * 
	 */
	
	private SystemServiceSettingService service;
	private SystemServiceService systemServiceService;
	private SystemServiceSetting bean;
	private Collection<SystemServiceSetting> beans;	
	private Collection<SystemService> syses;
	
	public String byworkflow() throws Exception{
		syses = systemServiceService.gets();
		workflowDescriptor  = workflowService.getWorkflowDescriptor(workflowPk);
		return "byworkflow";
	}
	
	
	
	public void setBean(SystemServiceSetting bean){
	     this.bean = bean;
	}
	public SystemServiceSetting getBean(){
	     return this.bean;
	}
	public void setBeans(Collection<SystemServiceSetting> beans){
	
	     this.beans = beans;
	}
	public Collection<SystemServiceSetting> getBeans(){
	     return this.beans;
	}
	
	@Resource
	public void setService(SystemServiceSettingService service) {
		this.service = service;
		this.setDataProvider(service);
	}	
	
	public SystemServiceSettingService getService(){
	   return this.service;
	}



	@Resource
	public void setSystemServiceService(SystemServiceService systemServiceService) {
		this.systemServiceService = systemServiceService;
	}



	public void setSyses(Collection<SystemService> syses) {
		this.syses = syses;
	}



	public Collection<SystemService> getSyses() {
		return syses;
	}
	
	
		
}